package io.renren.modules.sys.pojo;

import io.renren.common.util.BeanUtils;
import io.renren.modules.sys.entity.SysUserEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.List;

@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
public class SysUserRoleDTO extends SysUserEntity{

    private static final long serialVersionUID = -4075659914654394984L;

    /**
     * 角色ID列表
     */
    @ApiModelProperty("角色ID列表")
    private List<Long> roleIdList;

    public SysUserRoleDTO(SysUserEntity entity){
        this.setUser(entity);
    }

    public void setUser(SysUserEntity entity){
        BeanUtils.copyProperties(entity,this);
    }
}
